import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Demo3 {
    public static void main(String[] args) {
        //测试ArrayLists代码
        List<Integer> list = new ArrayList<>();
        for(int i = 0; i < 8; i ++){
            list.add(i);
        }
        System.out.println(list);
        list = (list.subList(0,3));
        System.out.println(list);
    }
    public static void main2(String[] args) {
        Scanner scan = new Scanner(System.in);
        //输入
        int N = scan.nextInt();
        int K = scan.nextInt();
        int[] array = new int[N];
        for(int i = 0; i < N; i++){
            array[i] = scan.nextInt();
        }
        int ret = 0;
        int sum = 0;
        for(int i = 0; i < N; i++){
            for(int j = i; j < N; j++){
                sum += array[j];
                if(sum % K == 0)ret++;
            }
            sum = 0;
        }
        System.out.print(ret);
        scan.close();
    }
}
